package org.example.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;

/**
 * @author qiangt
 * @version 1.0
 * @date 2025/5/8 8:00
 * @description: 单词excel数据传输对象
 */
@Data
public class WordDTO {
    /**
     * 单词
     */
    @ExcelProperty("单词")
    private String word;
    /**
     * 音标
     */
    @ExcelProperty("音标")
    private String soundmark;
    /**
     * 释义
     */
    @ExcelProperty("释义")
    private String explain;
    /**
     * 巧记
     */
    @ExcelProperty("巧记")
    private String remember;
    /**
     * 例句
     */
    @ExcelProperty("例句")
    private String example;

    @Override
    public String toString() {
        return word + " " + explain.replaceAll("[a-zA-Z.]", "").replaceAll("[\r\n]", "") + " " + remember.replaceAll("[\r\n]", "") + " " + example.replaceAll("[\r\n]", "");
    }
}
